﻿using System.Text;
using Styx.Helpers;
using System.IO;
using Styx;
using Styx.Common;
using System.ComponentModel;
using DefaultValue = Styx.Helpers.DefaultValueAttribute;
using Styx.TreeSharp;
using Styx.WoWInternals.WoWObjects;
using System.Windows.Forms;

namespace Priest
{
    class PriestSettings : Settings
    {
        private static LocalPlayer Me { get { return StyxWoW.Me; } }
        public static readonly PriestSettings myPrefs = new PriestSettings();
        
        public PriestSettings() 
            :base(Path.Combine(Utilities.AssemblyDirectory, string.Format(@"Routines/Settings/Priest/{0}-PriestSettings-{1}.xml", StyxWoW.Me.RealmName, StyxWoW.Me.Name)))
        {
        }

        [Setting, DefaultValue(true)]
        public bool AutoSVN { get; set; }

        [Setting, DefaultValue(true)]
        public bool AutoDispel { get; set; }

        [Setting, DefaultValue(true)]
        public bool AutoHolyDispel { get; set; }

        [Setting, DefaultValue(true)]
        public bool AutoHolyPurify { get; set; }

        [Setting, DefaultValue(true)]
        public bool AutoMovement { get; set; }

        [Setting, DefaultValue(true)]
        public bool AutoTargeting { get; set; }

        [Setting, DefaultValue(true)]
        public bool AutoFacing { get; set; }

        [Setting, DefaultValue(true)]
        public bool AutoMovementDisable { get; set; }

        [Setting, DefaultValue(true)]
        public bool AutoTargetingDisable { get; set; }

        [Setting, DefaultValue(true)]
        public bool AutoFacingDisable { get; set; }

        public enum KeyPress
        {
            None,
            A,
            B,
            C,
            D,
            E,
            F,
            G,
            H,
            I,
            J,
            K,
            L,
            M,
            N,
            O,
            P,
            Q,
            R,
            S,
            T,
            U,
            V,
            W,
            X,
            Y,
            Z
        }

        public enum KeyModifier
        {
            Alt,
            Control,
            Shift,
            Windows
        }

        [Setting, DefaultValue(KeyModifier.Alt)]
        public Keys Modkey { get; set; }

        [Setting, DefaultValue("Alt")]
        public string ModifkeyPause { get; set; }

        [Setting, DefaultValue("Alt")]
        public string ModifkeyCooldowns { get; set; }

        [Setting, DefaultValue("Alt")]
        public string ModifkeyStopAoe { get; set; }

        [Setting, DefaultValue("Alt")]
        public string ModifkeyPlayManual { get; set; }

        [Setting, DefaultValue("Shift")]
        public string ModifkeyStopDispel { get; set; }

        [Setting, DefaultValue("Shift")]
        public string ModifkeyStopPurify { get; set; }

        [Setting, DefaultValue(KeyPress.None)]
        public Keys KeyStopDispel { get; set; }

        [Setting, DefaultValue(KeyPress.None)]
        public Keys KeyStopPurify { get; set; }

        [Setting, DefaultValue(KeyPress.None)]
        public Keys KeyStopAoe { get; set; }

        [Setting, DefaultValue(KeyPress.None)]
        public Keys KeyUseCooldowns { get; set; }

        [Setting, DefaultValue(KeyPress.None)]
        public Keys KeyPauseCR { get; set; }

        [Setting, DefaultValue(KeyPress.None)]
        public Keys KeyPlayManual { get; set; }

        [Setting, DefaultValue(KeyPress.None)]
        public Keys KeySwitchBearform { get; set; }

        [Setting, DefaultValue(true)]
        public bool PrintRaidstyleMsg { get; set; }

        [Setting, DefaultValue(true)]
        public bool AutoInterrupt { get; set; }

        [Setting, DefaultValue(50)]
        public int FoodHPOoC { get; set; }

        [Setting, DefaultValue(50)]
        public int FoodManaOoC { get; set; }

        [Setting, DefaultValue(1)]
        public int Trinket1 { get; set; }

        [Setting, DefaultValue(false)]
        public bool Trinket1Use { get; set; }

        [Setting, DefaultValue(1)]
        public int Trinket2 { get; set; }

        [Setting, DefaultValue(false)]
        public bool Trinket2Use { get; set; }

        [Setting, DefaultValue(45)]
        public int PercentTrinket1HP { get; set; }

        [Setting, DefaultValue(45)]
        public int PercentTrinket1Mana { get; set; }

        [Setting, DefaultValue(85)]
        public int PercentSolace { get; set; }

        [Setting, DefaultValue(25)]
        public int PercentTrinket1Energy { get; set; }

        [Setting, DefaultValue(45)]
        public int PercentTrinket2HP { get; set; }

        [Setting, DefaultValue(45)]
        public int PercentTrinket2Mana { get; set; }

        [Setting, DefaultValue(25)]
        public int PercentTrinket2Energy { get; set; }

        [Setting, DefaultValue(90)]
        public int PercentPowerWordShield { get; set; }

        [Setting, DefaultValue(3)]
        public int Racial { get; set; }

        [Setting, DefaultValue(1)]
        public int RaidFlask { get; set; }

        [Setting, DefaultValue(5)]
        public int MindSearAdds { get; set; }

        [Setting, DefaultValue(76084)]
        public int RaidFlaskKind { get; set; }

        [Setting, DefaultValue(95)]
        public int PercentRenewCombat { get; set; }

        [Setting, DefaultValue(0)]
        public int PercentRenewOoC { get; set; }

        [Setting, DefaultValue(0)]
        public int PercentFlashHealOoC { get; set; }

        [Setting, DefaultValue(0)]
        public int PercentFlashHealCombat { get; set; }

        [Setting, DefaultValue(0)]
        public int PercentFiendMana { get; set; }

        [Setting, DefaultValue(45)]
        public int PercentHealthstone { get; set; }

        [Setting, DefaultValue(50)]
        public int PercentNaaru { get; set; }

        [Setting, DefaultValue(false)]
        public bool FlaskCrystal { get; set; }

        [Setting, DefaultValue(false)]
        public bool FlaskAlchemy { get; set; }

        [Setting, DefaultValue(false)]
        public bool FlaskOraliusCrystal { get; set; }

        [Setting, DefaultValue(1)]
        public int CDBerserking { get; set; }

        [Setting, DefaultValue(false)]
        public bool FiendAsDps { get; set; }

        [Setting, DefaultValue(false)]
        public bool FiendAsMana { get; set; }

        [Setting, DefaultValue(5)]
        public int HaloAdds { get; set; }

        [Setting, DefaultValue(5)]
        public int DivineStarAdds { get; set; }

        [Setting, DefaultValue(5)]
        public int CascadeAdds { get; set; }

        [Setting, DefaultValue(5)]
        public int VoidTendrilAdds { get; set; }

        [Setting, DefaultValue(5)]
        public int PsychicScreamAdds { get; set; }

        [Setting, DefaultValue(65)]
        public int PercentVampiricEmbrace { get; set; }

        [Setting, DefaultValue(35)]
        public int PercentDispersion { get; set; }

        [Setting, DefaultValue(60)]
        public int PercentDesperatePrayer { get; set; }

        [Setting, DefaultValue(5)]
        public int multiSWP { get; set; }

        [Setting, DefaultValue(5)]
        public int multiVT { get; set; }

        //holy
        [Setting, DefaultValue(true)]
        public bool AutoGuardianOnTank { get; set; }

        [Setting, DefaultValue(40)]
        public int percentGuardianSpiritTank { get; set; }

        [Setting, DefaultValue(true)]
        public bool keepRenewOnTanks500 { get; set; }

        [Setting, DefaultValue(true)]
        public bool keepRenewOnTanks510 { get; set; }

        [Setting, DefaultValue(true)]
        public bool keepRenewOnTanks520 { get; set; }

        [Setting, DefaultValue(90)]
        public int percentRenew500 { get; set; }

        [Setting, DefaultValue(85)]
        public int percentRenew510 { get; set; }

        [Setting, DefaultValue(80)]
        public int percentRenew520 { get; set; }

        [Setting, DefaultValue(true)]
        public bool buttonChakraSernenity500 { get; set; }

        [Setting, DefaultValue(false)]
        public bool buttonChakraSanctuary500 { get; set; }

        [Setting, DefaultValue(true)]
        public bool buttonChakraSernenity510 { get; set; }

        [Setting, DefaultValue(false)]
        public bool buttonChakraSanctuary510 { get; set; }

        [Setting, DefaultValue(false)]
        public bool buttonChakraSernenity520 { get; set; }

        [Setting, DefaultValue(true)]
        public bool buttonChakraSanctuary520 { get; set; }

        [Setting, DefaultValue(false)]
        public bool buttonMindbender500 { get; set; }

        [Setting, DefaultValue(65)]
        public int percentManaMindbender500 { get; set; }

        [Setting, DefaultValue(false)]
        public bool buttonMindbender510 { get; set; }

        [Setting, DefaultValue(65)]
        public int percentManaMindbender510 { get; set; }

        [Setting, DefaultValue(false)]
        public bool buttonMindbender520 { get; set; }

        [Setting, DefaultValue(65)]
        public int percentManaMindbender520 { get; set; }

        [Setting, DefaultValue(90)]
        public int percentBindingHeal500 { get; set; }

        [Setting, DefaultValue(85)]
        public int percentBindingHeal510 { get; set; }

        [Setting, DefaultValue(80)]
        public int percentBindingHeal520 { get; set; }

        [Setting, DefaultValue(85)]
        public int percentPrayerOfMending500 { get; set; }

        [Setting, DefaultValue(80)]
        public int percentPrayerOfMending510 { get; set; }

        [Setting, DefaultValue(75)]
        public int percentPrayerOfMending520 { get; set; }

        [Setting, DefaultValue(80)]
        public int percentHeal500 { get; set; }

        [Setting, DefaultValue(75)]
        public int percentHeal510 { get; set; }

        [Setting, DefaultValue(70)]
        public int percentHeal520 { get; set; }

        [Setting, DefaultValue(60)]
        public int percentFlashHeal500 { get; set; }

        [Setting, DefaultValue(55)]
        public int percentFlashHeal510 { get; set; }

        [Setting, DefaultValue(50)]
        public int percentFlashHeal520 { get; set; }

        [Setting, DefaultValue(60)]
        public int percentCircleOfHealing500 { get; set; }

        [Setting, DefaultValue(60)]
        public int percentCircleOfHealing510 { get; set; }

        [Setting, DefaultValue(60)]
        public int percentCircleOfHealing520 { get; set; }

        [Setting, DefaultValue(3)]
        public int CircleOfHealingPlayers500 { get; set; }

        [Setting, DefaultValue(5)]
        public int CircleOfHealingPlayers510 { get; set; }

        [Setting, DefaultValue(6)]
        public int CircleOfHealingPlayers520 { get; set; }

        [Setting, DefaultValue(50)]
        public int percentPrayerOfHealing500 { get; set; }

        [Setting, DefaultValue(50)]
        public int percentPrayerOfHealing510 { get; set; }

        [Setting, DefaultValue(50)]
        public int percentPrayerOfHealing520 { get; set; }

        [Setting, DefaultValue(4)]
        public int PrayerOfHealingPlayers500 { get; set; }

        [Setting, DefaultValue(6)]
        public int PrayerOfHealingPlayers510 { get; set; }

        [Setting, DefaultValue(8)]
        public int PrayerOfHealingPlayers520 { get; set; }

        [Setting, DefaultValue(60)]
        public int percentDivineHymn500 { get; set; }

        [Setting, DefaultValue(60)]
        public int percentDivineHymn510 { get; set; }

        [Setting, DefaultValue(60)]
        public int percentDivineHymn520 { get; set; }

        [Setting, DefaultValue(5)]
        public int DivineHymnPlayers500 { get; set; }

        [Setting, DefaultValue(6)]
        public int DivineHymnPlayers510 { get; set; }

        [Setting, DefaultValue(10)]
        public int DivineHymnPlayers520 { get; set; }


    }
}
